/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.iti.jets.gpts.service;

import com.iti.jets.gpts.dto.assist.Business;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

/**
 *
 * @author mustafajnr
 */

@Path("/route-info")
public class RouteDetailsService {
    
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public String getInfo(
            @QueryParam("route") String route
    ) {
        return Business.getRouteDetails(route);
//        return "[[{tranService:{id:1, tranServiceType:1, name:\"Microbus21\"}, target:\"{id:1, location:\"(55.456789000000001,44.567889999999998)\", isStop:\"true\", name:\"Haram\"}\", destination:\"{id:2, location:\"(33.456789000000001,99.567890000000006)\", isStop:\"true\", name:\"Helwan\"}\", distance:1715}],[{tranService:{id:1, tranServiceType:1, name:\"Microbus21\"}, target:\"{id:1, location:\"(55.456789000000001,44.567889999999998)\", isStop:\"true\", name:\"Haram\"}\", destination:\"{id:3, location:\"(44.234499999999997,55.340000000000003)\", isStop:\"true\", name:\"Smart\"}\", distance:16},{tranService:{id:1, tranServiceType:1, name:\"Microbus21\"}, target:\"{id:3, location:\"(44.234499999999997,55.340000000000003)\", isStop:\"true\", name:\"Smart\"}\", destination:\"{id:2, location:\"(33.456789000000001,99.567890000000006)\", isStop:\"true\", name:\"Helwan\"}\", distance:1700}],[{tranService:{id:1, tranServiceType:1, name:\"Microbus21\"}, target:\"{id:1, location:\"(55.456789000000001,44.567889999999998)\", isStop:\"true\", name:\"Haram\"}\", destination:\"{id:4, location:\"(52.23450000000003,55.340000000000003)\", isStop:\"true\", name:\"Ramsis\"}\", distance:860},{tranService:{id:1, tranServiceType:1, name:\"Microbus21\"}, target:\"{id:4, location:\"(54.23450000000003,55.340000000000003)\", isStop:\"true\", name:\"Ramsis\"}\", destination:\"{id:2, location:\"(33.456789000000001,99.567890000000006)\", isStop:\"true\", name:\"Helwan\"}\", distance:856}]]";
    }
    
}
